import axios from '@/utils/axios'
const {get,post,put,delete:del}=axios

// 获取收藏列表
export const getStars = (params) => {
  return get('/collect/list', {params})
}

// 删除多个
export const delStars = (data) => {
  return del('/collect/delete', {data})
}

// 单个删除
export const delStarOne = (id) => {
  return del('/collect/delete', {data: [parseInt(id)]})
}


// 获取收藏信息 id:string
export const getStarInfo = (id) => {
  return get(`/collect/info/${id}`)
  // return get('/collect/info', {params})
}

// 保存收藏
export const saveStar = (data) => {
  return post('/collect/save', data)
}

// 修改收藏
export const updateStar = (data) => {
  return put('/collect/update', data)
}